package com.atcumt.bytedance;

import java.util.Scanner;

public class Main08 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        long[] nums = new long[n];
        long res = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            nums[i] = scanner.nextLong();
        }
        if (nums.length == 0 || nums == null) {
            System.out.println(0);
        }
        for (int i = 0; i < n; i++) {
            long max = 0;
            for (int j = 0; j <= i; j++) {
                if (nums[j] >=0) {
                    max++;
                }
            }
            for (int j = i + 1; j < n; j++) {
                if (nums[j] <= 0) {
                    max++;
                }
            }
            res = Math.min(res, max);
        }
        System.out.println(res);
    }
}
